package com.qingke.easyjava.hibernate.bean;



import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
@Entity
@Table(name="accommodation")
public class Accommodation {
	@Id
	@Column(name="id")
	private int id;
	
	@Column(name="creat_datetime")
	private String creatDateTime;
	
	@Column(name="espie_datetime")
	private String espireDateTime;
	
	@ManyToOne
	@JoinColumn(name="apartment_id")
	private Apartment apartment;
	
	@ManyToOne
	@JoinColumn(name="student_id")
	private Student student;

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getCreatDateTime() {
		return creatDateTime;
	}

	public void setCreatDateTime(String creatDateTime) {
		this.creatDateTime = creatDateTime;
	}

	public String getEspireDateTime() {
		return espireDateTime;
	}

	public void setEspireDateTime(String espireDateTime) {
		this.espireDateTime = espireDateTime;
	}



	
	

	public Apartment getApartment() {
		return apartment;
	}

	public void setApartment(Apartment apartment) {
		this.apartment = apartment;
	}

	public Student getStudent() {
		return student;
	}

	public void setStudent(Student student) {
		this.student = student;
	}

	@Override
	public String toString() {
		return "Accommodation [id=" + id + ", creatDateTime=" + creatDateTime + ", espireDateTime=" + espireDateTime
				+  "]";
	}

	
	
	
	
}
